﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Library;

namespace OA.Exam.Front
{
    public partial class MyExams : System.Web.UI.Page
    {
        Exam myExam = new Exam();
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                Session["UserId"] = "zyj";
                BindView("");
            }
        }
        //绑定我的考卷列表
        protected void BindView(string paperName)
        {
            GridViewMyExams.DataSource = myExam.GetMyExams(paperName, Session["UserId"].ToString());
            GridViewMyExams.DataBind();
        }
        //查询
        protected void BtnSearcn_Click(object sender, EventArgs e)
        {
            BindView(TxtPaperName.Text.Trim());
        }
    }
}
